Skip to content

Fix display parameters#596

Merged
dale-wahl merged 4 commits into
masterfrom
adopt_type
Jun 11, 2026
Merged

Fix display parameters#596
dale-wahl merged 4 commits into
masterfrom
adopt_type

Conversation

@dale-wahl

Copy link
Copy Markdown
Member

All I wanted to do was get the appropriate parameters of a filtered dataset. In order to properly display a filter's properties, we need to look up that processor that produced it. get_own_processor? Not here.

DataSet.type == BasicProcessor.type is True 99% of the time. But a DataSet's type represents the result file and how it is structured (e.g. extension, map_item, etc.). Filters, merge dataset, and a couple other places are processors that manage to create a dataset of a different type then themselves.

This goes about codifying this slight difference by an adopt_type method that allows a DataSet's type to be changed while also recording a producer_type parameter. We could also fold in any other necessities here if needed. I block setting type directly to avoid issues down the line. While I was at it, I added a get_displayable_parameters which is what I was really after that resolves which processor type to use. I think this is pretty clean and straightforward, but I wanted a PR so it is seen at the very least.

Slightly related and possibly a candidate to fold into this: DataSet.datasource. I honestly did not know we had that. It is essentially the type again but only exists if the DataSet is also a datasource. It does not appear extensively used.

…layable_parameters

moving displayable parameters to dataset class itself; also ensuring type is not set arbitrarily without also setting a `producer_type`
@dale-wahl dale-wahl requested a review from stijn-uva May 14, 2026 13:46
Comment thread common/lib/dataset.py Outdated
@dale-wahl dale-wahl merged commit 32ec1c9 into master Jun 11, 2026
3 checks passed
@dale-wahl dale-wahl deleted the adopt_type branch June 11, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants